package com.woniuxy.service.impl;

import com.woniuxy.service.ExceptionService;
import com.woniuxy.utils.MyException;
import org.springframework.stereotype.Service;

/**
 * @Author: ideaAdmin
 * TODO:
 * Date: 2022/2/11:17:23
 * Description:
 */
@Service
public class ExceptionServiceImpl implements ExceptionService {
    @Override
    public String test() {
        try {
            int i = 1 / 0;
        } catch (Exception e) {
            throw new MyException(e.getMessage());
        }
        return null;
    }

    @Override
    public String annotationTest() {
        int i = 1 / 0;
        return null;
    }
}
